package org.jeecg.modules.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.app.entity.Swipe;
import org.jeecg.modules.app.mapper.SwipeMapper;
import org.jeecg.modules.app.service.SwipeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 李圳川
 * @version 1.0
 * @date 2022/6/15 1:49
 * @content
 */
@Service
public class SwipeServiceImpl implements SwipeService {

    @Autowired
    private SwipeMapper swipeMapper;

    /**
     * 查询轮播图
     * @return
     */
    @Override
    public List<Swipe> findSwipe() {
        QueryWrapper<Swipe> queryWrapper = new QueryWrapper<>();
        List<Swipe> swipeArrayList = swipeMapper.selectList(
                queryWrapper.eq("status",1)
        );
        return swipeArrayList;
    }
}
